//
// Created by liu on 2019/10/5.
//

#ifndef DESIGNPATTERNS_FACTORY_H
#define DESIGNPATTERNS_FACTORY_H

# include <iostream>

class TV{
public:
    virtual void Play() = 0;
};

class TVfactory{
public:
    virtual TV* produceTV() = 0;
};

class HaierTVFactory : public TVfactory{
public:
    TV* produceTV();
};

class HisenseTVFactory : public TVfactory{
public:
    TV* produceTV();
};

class HaierTV : public TV{
public:
    void Play()
    {
        std::cout<<"HaierTV are Created"<<std::endl;
    }
};

class HisenseTV : public TV{
public:
    void Play()
    {
        std::cout<<"Hisense are Created"<<std::endl;
    }
};

#endif //DESIGNPATTERNS_FACTORY_H
